# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=paprefs
pkgver=1.0
pkgrel=1
pkgdesc="Configuration dialog for PulseAudio"
url="https://freedesktop.org/software/pulseaudio/paprefs/"
license=(GPL2)
arch=(x86_64)
depends=(gtkmm3 libsigc++ dbus-glib pulseaudio)
makedepends=(meson lynx tidy git)
_commit=9963030dc010ee691c4f15fe22d78bcd4beb198a  # tags/v1.0^0
source=("git+https://anongit.freedesktop.org/git/pulseaudio/paprefs#commit=$_commit")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D lynx=true
  ninja -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 build/doc/README
}
